<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<f:view xmlns="http://www.w3.org/1999/xhtml"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:pm="http://primefaces.org/mobile"
        renderKitId="PRIMEFACES_MOBILE" 
        xmlns:p="http://primefaces.org/ui"
        xmlns:f="http://java.sun.com/jsf/core"
        contentType="text/html"
        xmlns:h="http://java.sun.com/jsf/html">

   <pm:page title="Login">

        <pm:view id="viewA">
            <pm:header title="Login" swatch="b"/>
            <pm:content>
                <h:form >
                    <center>
                        <h:panelGrid columns="3">
                            <h:outputLabel for="usuario" value="Usuario :"/>
                            <p:inputText id="usuario" value="#{LoginBean.user}" required="true">  
                                <f:validateLength minimum="0" />  
                            </p:inputText>  
                            <p:message for="usuario" display="icon"/>
                            <h:outputLabel for="cotrasena" value="Contraseña :"/>
                            <p:password feedback="true" id="contrasena" value="#{LoginBean.password}" required="true">  
                                <f:validateLength minimum="0" />  
                                <p:ajax update="msgSurname" event="keyup" />  
                            </p:password>
                            <p:message for="contrasena" id="msgSurname" display="icon"/> 

                        </h:panelGrid>
                        <p:commandButton value="Entrar" action="#{LoginBean.actionProcessMobile}" />
                        
                    </center>
                </h:form>
            </pm:content>
        </pm:view>

        <pm:view id="viewB" >
            <pm:header title="Menu">
                <f:facet name="left">
                    <p:button value="Back" icon="back" onclick="history.back()"/>
                </f:facet>
            </pm:header>
            <pm:content>
                <h:form>
                    <p:panel header="Menu">
                        
                        <h:commandButton action="MobileMap" value="Map"/>
                  
                    </p:panel>
                </h:form>
            </pm:content>
        </pm:view>

    </pm:page>
</f:view>
